<?php

//Configure log4php.
require_once "php/log4php/Logger.php";
Logger::configure("log4php.config.xml");

// Define this and check for it in .php script files to make sure they are called from a running session.
define("_ARKN_EXEC", "_ARKN_EXEC");

// Define the domain where this is hosted.
define("DOMAIN", "localhost");

// Define website address.
define("ROOT_ADDRESS", "http://" . DOMAIN);

// Define root folder.
define("ROOT_FOLDER", $_SERVER["DOCUMENT_ROOT"]);

// Change the parameters such that...
session_set_cookie_params( 
    0, // lifetime 0 means cookie expires when user closes browser
    "/", // root path
    "", // for this domain, let the fucking browser deal with this
    FALSE, // is http-secure only
    TRUE // and is http-only - not for javascript :)
);

// Start the session.
session_start();

// Set the value in the auth index.
if(!isset($_SESSION["auth"]))
	$_SESSION["auth"] = 0;

// Set a new session id.
session_regenerate_id();

?>